package color.koitq.picker.entity;

import android.os.Parcel;
import android.os.Parcelable;

import com.chad.library.adapter.base.entity.MultiItemEntity;

public class PaletteModel implements Parcelable , MultiItemEntity {
    private int paletteId;
    private String title;
    private String colors;
    private String keywords;
    private int isFavorite;
    private int groupIndex;
    private String keywordsPinyin;
    private String keywordsEn;
    private int type;

    public PaletteModel() {
    }

    protected PaletteModel(Parcel in) {
        paletteId = in.readInt();
        title = in.readString();
        colors = in.readString();
        keywords = in.readString();
        isFavorite = in.readInt();
        groupIndex = in.readInt();
        keywordsPinyin = in.readString();
        keywordsEn = in.readString();
        type = in.readInt();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(paletteId);
        dest.writeInt(type);
        dest.writeString(title);
        dest.writeString(colors);
        dest.writeString(keywords);
        dest.writeInt(isFavorite);
        dest.writeInt(groupIndex);
        dest.writeString(keywordsPinyin);
        dest.writeString(keywordsEn);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<PaletteModel> CREATOR = new Creator<PaletteModel>() {
        @Override
        public PaletteModel createFromParcel(Parcel in) {
            return new PaletteModel(in);
        }

        @Override
        public PaletteModel[] newArray(int size) {
            return new PaletteModel[size];
        }
    };

    public int getType() {
        return type;
    }

    public PaletteModel setType(int type) {
        this.type = type;
        return this;
    }

    public int getPaletteId() {
        return paletteId;
    }

    public void setPaletteId(int paletteId) {
        this.paletteId = paletteId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getColors() {
        return colors;
    }

    public void setColors(String colors) {
        this.colors = colors;
    }

    public int getIsFavorite() {
        return isFavorite;
    }

    public void setIsFavorite(int isFavorite) {
        this.isFavorite = isFavorite;
    }

    public String getKeywords() {
        return keywords;
    }

    public void setKeywords(String keywords) {
        this.keywords = keywords;
    }

    public int getGroupIndex() {
        return groupIndex;
    }

    public void setGroupIndex(int groupIndex) {
        this.groupIndex = groupIndex;
    }

    public String getKeywordsPinyin() {
        return keywordsPinyin;
    }

    public void setKeywordsPinyin(String keywordsPinyin) {
        this.keywordsPinyin = keywordsPinyin;
    }

    public String getKeywordsEn() {
        return keywordsEn;
    }

    public void setKeywordsEn(String keywordsEn) {
        this.keywordsEn = keywordsEn;
    }

    @Override
    public int getItemType() {
        return type;
    }
}
